package com.akkainaction.tool.extension.spring;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestSpring {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
        ctx.scan("com.akkainaction.tool.extension.spring");
        ctx.refresh();
        ActorSystem system=ctx.getBean(ActorSystem.class);
        ActorRef ref=system.actorOf(SpringExtProvider.getInstance().get(system).createProps("actorDemo"),"actorDemo");
        ref.tell("hello",ActorRef.noSender());
    }
}
